package com.dgz.coolshark.mapper;

import com.dgz.coolshark.pojo.entity.Product;
import com.dgz.coolshark.pojo.vo.*;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author duguozheng
 * @Date 2023/04/28  15:53
 * @Description
 * @Version 1.0
 */
@Repository
public interface ProductMapper {
    int insert(Product product);

    List<ProductAdminVo> selectForAdmin();

    String selectUrlById(int id);

    void deleteById(int id);

    ProductUpdateVo selectById(int id);

    void update(Product product);

    List<ProductTopListVo> selectTopList();

    List<ProductIndexVo> selectIndex();

    ProductDetailVo selectDetailById(int id);

    List<ProductIndexVo> selectByCategoryId(int id);

    List<ProductIndexVo> selectByKwd(String kwd);
    void updateViewCountById(int id);
}
